
import * as cc from "cc";
import { CellSkillIcon } from "../items/CellSkillIcon";
import { PageBase } from "./PageBase";
const { ccclass, } = cc._decorator;

/**
 * Predefined variables
 * Name = PageSkill
 * DateTime = Sun Mar 20 2022 13:34:59 GMT+0800 (中国标准时间)
 * Author = 272493431
 * FileBasename = PageSkill.ts
 * FileBasenameNoExtension = PageSkill
 * URL = db://assets/scripts/scene/VMDemo/page/PageSkill.ts
 * ManualUrl = https://docs.cocos.com/creator/3.4/manual/zh/
 *
 */
 
@ccclass('PageSkill')
export class PageSkill extends PageBase{
  
    onLoaded(){
        let skil_list = this.find("skill_tree/skil_list");
        // let index = 0;
        // let node = skil_list.children[index]
        // let cell = new CellSkillIcon();
        //     cell.onCtor(node);
        //     cell.index = index + 1;
        skil_list.children.forEach((node,index)=>{
            let cell = new CellSkillIcon();
            cell.onCtor(node);
            cell.index = index + 1;
        });
    }

    onUnloaded(){

    }
    
    onActive(): void {
        super.onActive();
    }

    onFreeze(): void {
        super.onFreeze();
    }
}